Baltimore Ceasefire 365 is a city-wide call asking Baltimore residents to avoid having any murders through quarterly Ceasefires and Peace Challenges (February, May, August, and November).
In this post, we use open data and R to look at the distribution of shooting deaths in space and time, and model the impact of the Ceasefires.
Baltimore releases detailed data on issues relevant to the city, including crime. Here’s the raw numbers of shooting deaths, plotted for each day.
You can tap neighborhoods to see exact numbers.
This map shows the raw count of murders in Baltimore since 2012 by neighborhood.
This version adjusts by the population of each neighborhood. Be careful about the super bright red areas, because some of them have very few residents and so even a single shooting will make them look really dangerous even though they’re probably not. (You can tap neighborhoods to see the number of residents.)
Ceasefires have been called four times per year since August 2017. These are “ceasefire weekends” but their impact often extends well beyond a few days. One lasted twelve.
We want to include information about the date, the day of the week (Mon-Sun), the day of the year (1-365), and a binary variable indicating whether a date occurs during ceasefire.
We’ll predict shootings using a spline time trend, a cyclical spline for yearly seasonality, random effects for day of the week, and a binary indicator for the ceasefire. We use a Poisson link function because the outcome is a count and the mean is about the same as sd.
library(rstanarm)
m2 <- stan_gamm4(shootings ~
s(jul) +
s(day.of.year,
bs="cc") + #cyclical constraint
ceasefire,
random= ~ (1 | weekday),
data=daily,
cores=4,
iter=1000,
family=poisson)
Here is a plot of the model against the observations. The red line represents the average while the grey area is the 80% predictive interval, which means that about 80% of days will have shooting death counts within the grey area. 10% of days will have shooting counts above the grey area
Ceasefires are visible as eight dramatic downward red spikes beginning in 2017.
Here are the marginal seasonal and time trend effects, showing the components that make up the above time series. The specific numbers of shootings are to some extent dependent upon the reference point, but these figures give you the right idea of the shape of the trends. Shootings deaths increased sometime in 2015 and have stayed high. There’s very little variation by day of the week. We do see a strong seasonal effect, with summers showing up as particularly bad.
Our model specification has slower-moving seasonal trends. Summers still show up as particularly bad.
Finally, we can use this model to measure the effect of Ceasefires on shooting deaths per day, after accounting for all these trends and seasonalities. The effect of the Ceasefire (plotted here as an odds ratio) is classically statistically significant and suggest an approximate 40% reduction in shooting deaths during ceasefire weekends:
We can also use this model to see the impact of the ceasefire at specific points in time. For example, here is the model-estimated impact of the ceasefire on Friday August 2nd, 2019.
Without a ceasefire, we’d expect about one person to get killed each day on average. But because this will be a Ceasefire weekend, the model expects about half that many to be killed.
Notice the little blue horizontal lines drawn at 0 and 1. Those marks represent the 50% window for the number of murders you can expect on any given day. The fact that the upper tick mark rests at 1 indicates that there will be more than one murder on ceasefire weekend days every once in awhile (though <25% of the time). The ceasefire impact is real and it won’t be unexpected for there to be some murders on ceasefire weekends.